Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow Adding, Importing, Editing, and Deleting a Feature Flag for Users with the 'Reader' Role #2002

Merged
merged 9 commits into from
Oct 3, 2024

Conversation

zackcl
Copy link
Collaborator

@zackcl zackcl commented Oct 1, 2024

Resolves #1998

This PR resolves the issue but the CSS styles for the disabled slide toggles and edit/remove buttons might need to be improved, because currently they are simply greyed out.

@zackcl
Copy link
Collaborator Author

zackcl commented Oct 1, 2024

It seems that it's quite challenging to make the slide toggles disabled but retain their colored appearance. We have two potential approaches:

  1. Set the "disabled" attribute to true for mat-slide-toggle to make the slide toggle unresponsive, and then override the colors to prevent it from appearing grey.
  2. Add a custom class to the slide toggle when it's disabled, and use CSS to make it unresponsive.

I've attempted both approaches, and they both present significant difficulties. For now, I've simply set the "disabled" attribute to true to make the toggles unresponsive. I can revisit this issue later, but if anyone has a robust solution, please let me know.

Screenshot 2024-10-02 at 3 58 56 AM

@zackcl zackcl marked this pull request as ready for review October 1, 2024 19:26
Copy link
Collaborator

@Yagnik56 Yagnik56 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small changes need to be addressed, but overall PR looks good.

Copy link
Collaborator

@ppratikcr7 ppratikcr7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zackcl So, after the last commit, the exclusion list edit and and delete action buttons are disabled for admin role and enabled for reader role. Can you please check this.

@zackcl zackcl requested review from ppratikcr7 and Yagnik56 October 3, 2024 11:19
@ppratikcr7 ppratikcr7 merged commit f86feda into dev Oct 3, 2024
14 checks passed
@ppratikcr7 ppratikcr7 deleted the bugfix/1998-limit-ff-reader-actions branch October 3, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding, Importing, Editing, and Deleting a Feature Flag Should Not Be Allowed for Users with the 'Reader' Role
3 participants